<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document利用字面量创建对象</title>
    <script>
        //创建一个空对象
        var obj = {};
        //创建一个学生对象
        var stu1 = {
            name: '阿明',
            age: '18',
            sex: '男',
            sayHello: function() {
                console.log('Hello');
            }
        };
    </script>
</head>

<body>

</body>

</html>